import java.util.Scanner;
public class hw8 {
        /**
         * 需求：三个班   5门课   计算总成绩、平均成绩  最高分  最低分
         */
        public static void main(String[] args) {
            Scanner input = new Scanner(System.in);
            int k=1;
            do {
            System.out.println("请输入"+k+"班五名学生的成绩");
            final int NUM = 5;
            int score;
            int sum = 0;
            float avg = 0.0F;
            int max = 0;
            int min = 0;
            for (int i = 1; i <= NUM; i++) {
                System.out.print("请输入第" + i + "个学生的成绩：");
                score = input.nextInt();
                if(i == 1) {
                    min = score;
                }
                sum += score;
                if(max < score) {
                    max = score;
                }
                if(min > score) {
                    min = score;
                }
            }
            avg = (float)sum / NUM;
            System.out.println(k + "班的平均分是：" + avg + ",最高分是：" + max +
                    ",最低分是：" + min + ",总分是：" + sum);
            k++;
        }while (k<=3);
    }}


